﻿using System;

namespace intArray
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Enter the size of the array:");
            int ArraySize = Convert.ToInt32(Console.ReadLine());
            int[] testArray = new int[ArraySize];
            Console.WriteLine("Enter each element:");
            for(int i = 0; i < ArraySize; i++)
            {
                testArray[i] = Convert.ToInt32(Console.ReadLine());
            }
            int maxNum= testArray[0];
            int minNum = testArray[0];
            int sum = 0;
            int average;
           for(int i=0;i<ArraySize;i++)
            {
                if (testArray[i] > maxNum)
                {
                    maxNum = testArray[i];
                }
                if (testArray[i] < minNum)
                {
                    minNum = testArray[i];
                }
                sum += testArray[i];

            }
            average = sum / ArraySize;
            Console.WriteLine("The max num:" + maxNum);
            Console.WriteLine("The min Num:" + minNum);
            Console.WriteLine("The sum:" + sum);
            Console.WriteLine("The average:" + average);

        }
    }
}
